package AlarmIRPConstDefs;


/**
 * Generated from IDL struct "Comment".
 *
 * @author JacORB IDL compiler V 2.3.0, 17-Feb-2007
 * @version generated at 2013-5-20 22:07:19
 */

public final class CommentHelper
{
	private static org.omg.CORBA.TypeCode _type = null;
	public static org.omg.CORBA.TypeCode type ()
	{
		if (_type == null)
		{
			_type = org.omg.CORBA.ORB.init().create_struct_tc(AlarmIRPConstDefs.CommentHelper.id(),"Comment",new org.omg.CORBA.StructMember[]{new org.omg.CORBA.StructMember("comment_time", ManagedGenericIRPConstDefs.IRPTimeHelper.type(), null),new org.omg.CORBA.StructMember("comment_text", org.omg.CORBA.ORB.init().create_string_tc(0), null),new org.omg.CORBA.StructMember("user_id", org.omg.CORBA.ORB.init().create_string_tc(0), null),new org.omg.CORBA.StructMember("system_id", org.omg.CORBA.ORB.init().create_string_tc(0), null)});
		}
		return _type;
	}

	public static void insert (final org.omg.CORBA.Any any, final AlarmIRPConstDefs.Comment s)
	{
		any.type(type());
		write( any.create_output_stream(),s);
	}

	public static AlarmIRPConstDefs.Comment extract (final org.omg.CORBA.Any any)
	{
		return read(any.create_input_stream());
	}

	public static String id()
	{
		return "IDL:AlarmIRPConstDefs/Comment:1.0";
	}
	public static AlarmIRPConstDefs.Comment read (final org.omg.CORBA.portable.InputStream in)
	{
		AlarmIRPConstDefs.Comment result = new AlarmIRPConstDefs.Comment();
		result.comment_time=TimeBase.UtcTHelper.read(in);
		result.comment_text=in.read_string();
		result.user_id=in.read_string();
		result.system_id=in.read_string();
		return result;
	}
	public static void write (final org.omg.CORBA.portable.OutputStream out, final AlarmIRPConstDefs.Comment s)
	{
		TimeBase.UtcTHelper.write(out,s.comment_time);
		out.write_string(s.comment_text);
		out.write_string(s.user_id);
		out.write_string(s.system_id);
	}
}
